﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Domian.Entity
{
    /// <summary>
    /// 溯源信息类
    /// </summary>
    [Table("source_info")]
    public class SourceInfo
    {
        /// <summary>
        /// 溯源Id
        /// </summary>
        [Key]
        public int SourceId {  get; set; }
        [Required]
        /// <summary>
        /// 溯源编号
        /// </summary>
        public long SourceNo {  get; set; }
        [Required]
        /// <summary>
        /// 商品编号
        /// </summary>
        public long GoodNo {  get; set; }
        /// <summary>
        /// 保质期
        /// </summary>
        public int ShelfLife {  get; set; }
        [Required]
        [StringLength(100)]
        /// <summary>
        /// 生产批次
        /// </summary>
        public string? ProductionBatch {  get; set; }
        [Required]
        [StringLength(100)]
        /// <summary>
        /// 生产许可证号
        /// </summary>
        public string? ProductionLicenseNumber {  get; set; }
        [Required]
        [StringLength(100)]
        /// <summary>
        /// 生产企业
        /// </summary>
        public string? ProductionEnterprise {  get; set; }
        [Required]
        [StringLength(800)]
        /// <summary>
        /// 封面图
        /// </summary>
        public string? GoodPicture {  get; set; }
        [Required]
        [StringLength(800)]
        /// <summary>
        /// 产品检验报告
        /// </summary>
        public string? ProductInspectionReport { get; set; }
        [Required]
        [StringLength(50)]
        public string? CreateBy { get; set; } = "张三";
        public DateTime? CreateDate { get; set;} = DateTime.Now;
        [StringLength(50)]
        public string? UpdateBy { get; set;}
        public DateTime? UpdateDate { get; set;}
        public bool IsDelete {  get; set; }
    }
}
